package com.hsylient.javase.chapter12.demo03;

import lombok.SneakyThrows;
import org.junit.Test;

import java.net.InetAddress;

public class MyInetAddress {

    @Test
    @SneakyThrows
    public void testInetAddress() {
        System.out.println(InetAddress.getLocalHost());
        System.out.println(InetAddress.getByName("localhost"));

        InetAddress baiDu = InetAddress.getByName("www.baidu.com");
        System.out.println(baiDu);

    }
}
